﻿using System;

namespace Middleware
{
    /// <summary>
    /// Proxy para acessar o objeto remoto usando o requestor.
    /// </summary>
    [Serializable]
    public class CalculatorStub : StubBase, ICalculator
    {
        public CalculatorStub(RemoteObject remoteObject)
            : base(remoteObject) {
        }

        public int Sum(params int[] values) {
            return (int)base.Execute("Sum", true, values);
        }
        public int Sub(params int[] values) {
            return (int)base.Execute("Sub", true, values);
        }
        public int Mul(params int[] values) {
            return (int)base.Execute("Mul", true, values);
        }
        public int Div(params int[] values) {
            return (int)base.Execute("Div", true, values);
        }
    }
}
